All Questions
5 questions
0votes
1answer
119views
Should I define a separate interface for clarity rather than implementing Supplier<T>?
Let's say you have to meet some prerequisites before doing something. For that, I think implementing Supplier<Boolean> is a great candidate since it's widely used, and quick to understand. But, ...
1vote
1answer
108views
Adapt very different adapters to an Interface
I'm building a service to send push notifications to the user. At first, I designed an Interface for the push notification adapters, something like this: interface PushNotificationAdapterInterface { ...
-1votes
3answers
163views
Chain of responsibility look alike but choose handler at runtime
Currently I have an structure of PopUps and I've been thinking to use Chain of Responsibility pattern, but the difference is a popup can back to previous one PopUp and also can go to any other PopUp. ...
1vote
5answers
3kviews
Clean code for multiple entity representations
I'm wondering what is a clean solution for representing an entity in many different format. Let's suppose I have the following entity: Person { Long id; String title; String firstName; ...
8votes
2answers
11kviews
Doesn't repository pattern in clean architecture violate Dependency inversion principle?
From what I have read and seen clean architecture assumes that you have some entities which know nothing about persistence though at the same layer as they reside there might be an interface which has ...